#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>

int main()
{
    int t = 1;
    while(1)
    {
        printf("time = %d\n",t);
        sleep(1);

        //运行5s后调用abort发送信号SIGABRT，使进程退出
        if(t == 5)
            abort();
        t++;
    }
    return 0;
}